package cn.forkway;

import cn.forkway.domain.Student;
import cn.forkway.utils.MybatisUtils;
import org.apache.ibatis.session.SqlSession;
import org.junit.BeforeClass;
import org.junit.Test;

import java.util.List;

/**
 * @program: java-learn-mybatis
 * @className: MybatisUtils.java
 * @author: River Ray
 * @description: 测试mybatis Util
 * @createTime 2021年10月10日 11:41:00
 */
public class testUtils {
   @Test
   public void  query(){
      SqlSession sqlSession = MybatisUtils.getSessions(false);
      String sqlId = "cn.forkway.domain.Student" + "." + "selectStudent";
      List<Student> studentList = sqlSession.selectList(sqlId);
      studentList.forEach(System.out::println);
   }
}
